<me:UIVKKOPF x:Class="WPFExcelReport.TVKKPR"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"  
                    xmlns:KA="clr-namespace:WPFExcelReport;assembly=TKDANSP" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:HR="clr-namespace:WPFExcelReport;assembly=THRSTAMM"  
                    xmlns:VL="clr-namespace:WPFExcelReport;assembly=TVERSART"  
                    xmlns:ZA="clr-namespace:WPFExcelReport;assembly=TZABED"  
                    xmlns:ZB="clr-namespace:WPFExcelReport;assembly=TVKZUAB"   
                    xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                    xmlns:VKP="clr-namespace:WPFExcelReport;assembly=TVKPOS"   
                    xmlns:VKD="clr-namespace:WPFExcelReport;assembly=TVKADR"   
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIVKKOPF.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIVKKOPF.Resources>
    <StackPanel>
        <WrapPanel    VerticalAlignment="Top" Visibility="{Binding IsAuto,ElementName=TV,Converter={StaticResource bv}}">
        <Grid Margin="10,0,0,0"  VerticalAlignment="Top" Visibility="Collapsed">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock  Grid.Column="0" FontSize="16"  Text="{Binding Source={Localization:Translate Word=币种}}"/>
            <TextBlock  Grid.Column="1" FontSize="16"  Text="{Binding VKKKURS}"/>
        </Grid>
            <Grid Margin="10,0,0,0" Visibility="{Binding IsCanChg,ElementName=TV,Converter={StaticResource bv}}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Button  Click="EditCommand" Width="24" Height="20">
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Edit.png" />
                    </Button.Background>
                </Button>
            </Grid>
            <Grid Margin="10,0,0,0" Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource bv}}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Button   Click="SaveCommand" Height="20" Margin="5,0,0,0" Width="24" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Save.png" />
                    </Button.Background>
                </Button>
            </Grid>
            <Grid Margin="10,0,0,0" VerticalAlignment="Top" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock FontSize="16"  Text="{Binding Source={Localization:Translate Word=币种}}"/>
                <SD:TSSD0149 Grid.Column="1" 
                                 Name="cSD0149"
                                IsEdit="{Binding IsEdit,ElementName=TV}"
                                KEY="{Binding VKKHWAEHRSL,ElementName=TV}" MinWidth="60"
                                VALUE="{Binding KURS,ElementName=TV}"
                                EXAUF="{Binding VKKHWAEHRSL,ElementName=TV}"
                        />
            </Grid>
        </WrapPanel>
        <VKP:TVKPVAPR    
            IsAuto="{Binding IsAuto,ElementName=TV}"
            VKPSA="{Binding VKKSA,ElementName=TV}"
            INFO="{Binding INFO,ElementName=TV}"
             dwVKK="{Binding dwVKK,ElementName=TV}"
             ORDERNUM="{Binding VKPPOS,ElementName=TV}"
             IsEdit="{Binding IsEdit,ElementName=TV}"
             IsSaved="{Binding IsSaved,ElementName=TV}"/>
  
    </StackPanel>
</me:UIVKKOPF>
